import {pget,ppostJson, ppost} from '@/utils/req'
import {modalApi} from '@/utils/modalReq'

// 渠道奖励统计列表
export function getDitchsettleaccountsList(query: any) {
	return pget(`${modalApi.sales}/ditchsettleaccounts/page`, query)
}

// 渠道奖励统计详情
export function getDitchsettleaccountsDetails(query: any) {
	return pget(`${modalApi.sales}/ditchsettleaccounts/details`, query)
}

// 渠道奖励统计详情--奖励明细
export function geTselectDitchRewardsRecordsList(query: any) {
	return pget(`${modalApi.sales}/ditchsettleaccounts/selectDitchRewardsRecordsList`, query)
}

// 渠道奖励统计详情--补扣费
export function geTditchReplenishList(query: any) {
	return pget(`${modalApi.sales}/ditchsettleaccounts/ditchReplenishList`, query)
}

// 新增补扣费
export function insertDitchReplenish(query: any) {
	return ppostJson(`${modalApi.sales}/ditchreplenish/insertDitchReplenish`, query)
}

// 编辑补扣费
export function updateDitchReplenish(query: any) {
	return ppostJson(`${modalApi.sales}/ditchreplenish/updateDitchReplenish`, query)
}

// 审核
export function processAuditSuccess(query: any) {
	return ppostJson(`${modalApi.sales}/ditchreplenish/processAuditSuccess`, query)
}

// 审核记录--结算汇总审核
export function processList(query: any) {
	return pget(`${modalApi.sales}/ditchsettleaccounts/processList`, query)
}

// 审核记录--补扣费审核
export function processDitchList(query: any) {
	return pget(`${modalApi.sales}/ditchsettleaccounts/processDitchList`, query)
}

// 发起审批
export function initiateAudit(query: any) {
	return pget(`${modalApi.sales}/ditchsettleaccounts/initiateAudit`, query)
}

// 获取补扣费编号
export function getNoCS() {
	return pget(`${modalApi.sales}/ditchreplenish/getNo`)
}